﻿<T:AbstractDialogContentControl x:Class="Deployment.Data.UI.Controls.Step.StepEditorControl"
                                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                                xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                                xmlns:T="clr-namespace:Deployment.Data.UI.Dialogs"
                                xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                                xmlns:tasks ="clr-namespace:Deployment.Data.UI.Controls.Task"
                                DataContextChanged="AbstractDialogContentControl_DataContextChanged"
                                ContentOk="{Binding Path=isContentOk}"
                                mc:Ignorable="d" 
                                >
    <DockPanel Margin="4">
        <Grid DockPanel.Dock="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Label Grid.Row="0" Grid.Column="0"
               Content="Step Id:" VerticalAlignment="Center"/>
            <xctk:IntegerUpDown Grid.Row="0" Grid.Column="1"
                            Value="{Binding Sequence}" 
                            Margin="4"
                            Padding="2"
                            VerticalAlignment="Center"/>

            <Label Grid.Row="1" Grid.Column="0"
               Content="Step description:"
               VerticalAlignment="Center"/>
            <TextBox Grid.Row="1" Grid.Column="1"
                 Text="{Binding Description}"
                 Margin="4"
                 Padding="2"
                 VerticalAlignment="Center"/>

            <CheckBox Grid.Row="2" Grid.Column="1"
                  Content="Allow tasks to execute in parallel"
                  IsChecked="{Binding ProcessTasksInParallel}"
                  Margin="4"
                  Padding="2"
                  VerticalAlignment="Center"/>

        </Grid>
        
        <GroupBox DockPanel.Dock="Bottom"
                  Header="Step Tasks">
            <DockPanel LastChildFill="True">
                <tasks:EditableTaskList DataContext="{Binding Tasks}" 
                                        x:Name="EditableTaskList"
                                        DataContextChanged="EditableTaskList_DataContextChanged"/>
            </DockPanel>
            
            
        </GroupBox>
        
        
    </DockPanel>
</T:AbstractDialogContentControl>
